package com.jlh.jdk9.http;


//import jdk.incubator.http.HttpClient;
//import jdk.incubator.http.HttpRequest;
//import jdk.incubator.http.HttpResponse;
//
//import java.io.IOException;
//import java.net.URI;
//import java.net.URISyntaxException;
//import java.nio.charset.Charset;
//
///**
// * Created by jlh
// * On 2017/3/31 0031.
// */
//public class Main {
//    public static void main(String[] args) throws URISyntaxException, IOException, InterruptedException {
//        URI httpURI= new URI("https://www.baidu.com");
//        HttpRequest request = HttpRequest.newBuilder(httpURI).GET().build();
//        HttpClient httpClient = HttpClient.newHttpClient();
//        HttpResponse<String> response=httpClient.send(request, (statusCode, responseHeaders) -> HttpResponse.BodyProcessor.asString(Charset.forName("UTF-8")));
//        System.out.println(response);
//    }
//}
